-- CALC_REBELS_BONUS

-- 计算受伤的反叛军奖励
-- @param user    玩家对象
-- @param classId 提交的物品编号
return function(user, classId)
    local ret = {};
    local count = 1;

    if classId == 8103 then
        table.insert(ret, {1, 7503, 2});
        table.insert(ret, {2, "attack", 50});
        count = 10;
    elseif classId == 8156 then
        table.insert(ret, {1, 7503, 2});
        table.insert(ret, {2, "attack", 50});
        count = 10;
    elseif classId == 8137 then
        table.insert(ret, {1, 7503, 1});
        table.insert(ret, {2, "attack", 25});
        count = 3;
    elseif classId == 8060 then
        table.insert(ret, {1, 7503, 1});
        table.insert(ret, {2, "attack", 25});
        count = 3;
    elseif classId == 8139 then
        table.insert(ret, {1, 7503, 1});
        count = 3;
    else
        count = 1;
    end

    local items ={ 7499, 7500, 7501, 7502, };
    local values = { 0, 0, 0, 0, };
    for i = 1, count do
        local randSeed = DungeonM.getRandSeed("CALC_REBELS_BONUS");
        local index = randSeed % 4 + 1;

        values[index] = values[index] + 1;
    end

    for i = 1, #values do
        if values[i] > 0 then
            table.insert(ret, {1, items[i], values[i]});
        end
    end

    return ret;
end